<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:rich="http://richfaces.org/rich">
    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>经济分类</title>
        <script language="javascript">
            function updateCostItem(pcode, pname)
            {
                window.opener.updateCostItemName(pcode, pname);
                window.close();
            }
        </script>
    </h:head>
    <h:body>
        <h:form id="costItemList">
            <rich:tree value="#{economicBean.rootNode}" var="idept"
                       selectionType="ajax" toggleType="client"
                       style="width:300px" render="costinfo">
                <rich:treeNode ondblclick="updateCostItem('#{idept.data.code}', '#{idept.data.name}');" >
                    <h:outputText value="[#{idept.data.code}]#{idept.data.name}" />
                </rich:treeNode>
            </rich:tree>
        </h:form>
    </h:body>
</html>
